﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SendKeyTo.Core
{
    public static class Keybd_Info
    {
        static Keybd_Info()
        {
            KeyName = new Dictionary<Keybd_Enum, string>();

            KeyName.Add(Keybd_Enum.vbKeyLButton, "鼠标左键");
            KeyName.Add(Keybd_Enum.vbKeyRButton, "鼠标右键");
            KeyName.Add(Keybd_Enum.vbKeyCancel, "CANCEL 键");
            KeyName.Add(Keybd_Enum.vbKeyMButton, "鼠标中键");
            KeyName.Add(Keybd_Enum.vbKeyBack, "BACKSPACE 键");
            KeyName.Add(Keybd_Enum.vbKeyTab, "TAB 键");
            KeyName.Add(Keybd_Enum.vbKeyClear, "CLEAR 键");
            KeyName.Add(Keybd_Enum.vbKeyReturn, "ENTER 键");
            KeyName.Add(Keybd_Enum.vbKeyShift, "SHIFT 键");
            KeyName.Add(Keybd_Enum.vbKeyControl, "CTRL 键");
            KeyName.Add(Keybd_Enum.vbKeyMenu, "MENU 键");
            KeyName.Add(Keybd_Enum.vbKeyPause, "PAUSE 键");
            KeyName.Add(Keybd_Enum.vbKeyCapital, "CAPS LOCK 键");
            KeyName.Add(Keybd_Enum.vbKeyEscape, "ESC 键");
            KeyName.Add(Keybd_Enum.vbKeySpace, "SPACEBAR 键");
            KeyName.Add(Keybd_Enum.vbKeyPageUp, "PAGE UP 键");
            KeyName.Add(Keybd_Enum.vbKeyEnd, "END 键");
            KeyName.Add(Keybd_Enum.vbKeyHome, "HOME 键");
            KeyName.Add(Keybd_Enum.vbKeyLeft, "LEFT ARROW 键");
            KeyName.Add(Keybd_Enum.vbKeyUp, "UP ARROW 键");
            KeyName.Add(Keybd_Enum.vbKeyRight, "RIGHT ARROW 键");
            KeyName.Add(Keybd_Enum.vbKeyDown, "DOWN ARROW 键");
            KeyName.Add(Keybd_Enum.vbKeySelect, "Select 键");
            KeyName.Add(Keybd_Enum.vbKeyPrint, "PRINT SCREEN 键");
            KeyName.Add(Keybd_Enum.vbKeyExecute, "EXECUTE 键");
            KeyName.Add(Keybd_Enum.vbKeySnapshot, "SNAPSHOT 键");
            KeyName.Add(Keybd_Enum.vbKeyDelete, "Delete 键");
            KeyName.Add(Keybd_Enum.vbKeyHelp, "HELP 键");
            KeyName.Add(Keybd_Enum.vbKeyNumlock, "NUM LOCK 键");

            KeyName.Add(Keybd_Enum.vbKeyA, "A 键");
            KeyName.Add(Keybd_Enum.vbKeyB, "B 键");
            KeyName.Add(Keybd_Enum.vbKeyC, "C 键");
            KeyName.Add(Keybd_Enum.vbKeyD, "D 键");
            KeyName.Add(Keybd_Enum.vbKeyE, "E 键");
            KeyName.Add(Keybd_Enum.vbKeyF, "F 键");
            KeyName.Add(Keybd_Enum.vbKeyG, "G 键");
            KeyName.Add(Keybd_Enum.vbKeyH, "H 键");
            KeyName.Add(Keybd_Enum.vbKeyI, "I 键");
            KeyName.Add(Keybd_Enum.vbKeyJ, "J 键");
            KeyName.Add(Keybd_Enum.vbKeyK, "K 键");
            KeyName.Add(Keybd_Enum.vbKeyL, "L 键");
            KeyName.Add(Keybd_Enum.vbKeyM, "M 键");
            KeyName.Add(Keybd_Enum.vbKeyN, "N 键");
            KeyName.Add(Keybd_Enum.vbKeyO, "O 键");
            KeyName.Add(Keybd_Enum.vbKeyP, "P 键");
            KeyName.Add(Keybd_Enum.vbKeyQ, "Q 键");
            KeyName.Add(Keybd_Enum.vbKeyR, "R 键");
            KeyName.Add(Keybd_Enum.vbKeyS, "S 键");
            KeyName.Add(Keybd_Enum.vbKeyT, "T 键");
            KeyName.Add(Keybd_Enum.vbKeyU, "U 键");
            KeyName.Add(Keybd_Enum.vbKeyV, "V 键");
            KeyName.Add(Keybd_Enum.vbKeyW, "W 键");
            KeyName.Add(Keybd_Enum.vbKeyX, "X 键");
            KeyName.Add(Keybd_Enum.vbKeyY, "Y 键");
            KeyName.Add(Keybd_Enum.vbKeyZ, "Z 键");

            KeyName.Add(Keybd_Enum.vbKey0, "0 键");
            KeyName.Add(Keybd_Enum.vbKey1, "1 键");
            KeyName.Add(Keybd_Enum.vbKey2, "2 键");
            KeyName.Add(Keybd_Enum.vbKey3, "3 键");
            KeyName.Add(Keybd_Enum.vbKey4, "4 键");
            KeyName.Add(Keybd_Enum.vbKey5, "5 键");
            KeyName.Add(Keybd_Enum.vbKey6, "6 键");
            KeyName.Add(Keybd_Enum.vbKey7, "7 键");
            KeyName.Add(Keybd_Enum.vbKey8, "8 键");
            KeyName.Add(Keybd_Enum.vbKey9, "9 键");

            KeyName.Add(Keybd_Enum.vbKeyNumpad0, "0 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad1, "1 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad2, "2 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad3, "3 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad4, "4 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad5, "5 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad6, "6 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad7, "7 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad8, "8 键 小键盘");
            KeyName.Add(Keybd_Enum.vbKeyNumpad9, "9 键 小键盘");

            KeyName.Add(Keybd_Enum.vbKeyMultiply, "MULTIPLICATIONSIGN(*)键");
            KeyName.Add(Keybd_Enum.vbKeyAdd, "PLUS SIGN (+) 键");
            KeyName.Add(Keybd_Enum.vbKeySeparator, "ENTER 键");
            KeyName.Add(Keybd_Enum.vbKeySubtract, "MINUS SIGN (-) 键");
            KeyName.Add(Keybd_Enum.vbKeyDecimal, "DECIMAL POINT (.) 键");
            KeyName.Add(Keybd_Enum.vbKeyDivide, "DIVISION SIGN (/) 键");

            KeyName.Add(Keybd_Enum.vbKeyF1, "F1 键");
            KeyName.Add(Keybd_Enum.vbKeyF2, "F2 键");
            KeyName.Add(Keybd_Enum.vbKeyF3, "F3 键");
            KeyName.Add(Keybd_Enum.vbKeyF4, "F4 键");
            KeyName.Add(Keybd_Enum.vbKeyF5, "F5 键");
            KeyName.Add(Keybd_Enum.vbKeyF6, "F6 键");
            KeyName.Add(Keybd_Enum.vbKeyF7, "F7 键");
            KeyName.Add(Keybd_Enum.vbKeyF8, "F8 键");
            KeyName.Add(Keybd_Enum.vbKeyF9, "F9 键");
            KeyName.Add(Keybd_Enum.vbKeyF10, "F10 键");
            KeyName.Add(Keybd_Enum.vbKeyF11, "F11 键");
            KeyName.Add(Keybd_Enum.vbKeyF12, "F12 键");


            KeyName.Add(Keybd_Enum.vbKeyNext, "下一曲");
            KeyName.Add(Keybd_Enum.vbKeyPrevious, "上一曲");
            KeyName.Add(Keybd_Enum.vbKeyPause_M, "暂停");
            KeyName.Add(Keybd_Enum.vbKeyPlayOrPause, "播放或者暂停");
            KeyName.Add(Keybd_Enum.vbKeyVolumeUp, "音量加");
            KeyName.Add(Keybd_Enum.vbKeyVolumeDown, "音量减");
            KeyName.Add(Keybd_Enum.vbKeySoundOff, "静音");
            KeyName.Add(Keybd_Enum.vbKeyBrowser, "浏览器");
            KeyName.Add(Keybd_Enum.vbKeyEmail, "邮件");
            KeyName.Add(Keybd_Enum.vbKeySearch, "搜索");
            KeyName.Add(Keybd_Enum.vbKeyCollect, "收藏");
        }

        private static Dictionary<Keybd_Enum, string> _keyName;
        /// <summary>
        /// 枚举对应按键的名称
        /// </summary>
        public static Dictionary<Keybd_Enum, string> KeyName
        {
            get
            {
                return _keyName;
            }
            private set
            {
                _keyName = value;
            }
        }

        /// <summary>
        /// 获取按键对应名称
        /// </summary>
        /// <param name="keyenum"></param>
        /// <returns></returns>
        public static string GetKeyInfo(Keybd_Enum keyenum)
        {
            if (KeyName.ContainsKey(keyenum))
            {
                return KeyName[keyenum];
            }
            return null;
        }
    }
}
